package startsql;



abstract class NewOfConnectDBFabric {
                //public abstract TaxProcessor createTaxProcessor();
                //public abstract ShipFeeProcessor createShipFeeProcessor();
                
                public abstract InitializationDB createIinitialization();
                public abstract ConnectDB createConnect();
                public abstract QueryDB createQuery();
}
 
abstract class InitializationDB{
	
}

abstract class QueryDB{
	
}

abstract class ConnectDB{
	
}


//abstract class ShipFeeProcessor {
                //abstract void calculateShipFee(Order order);
//}
 

//abstract class TaxProcessor {
                //abstract void calculateTaxes(Order order);
//}
 
        // Factories

class FireBirdDBFactory extends NewOfConnectDBFabric{
		public InitializationDB createIinitialization(){
			return new FireBirdDBIninitialization();
		}
		
		public ConnectDB createConnect(){
			return new FireBirdDBConnect();
		}
		public QueryDB createQuery(){
			return new FireBirdDBQuery();
		}
		
}

/*class CanadaFinancialToolsFactory extends NewOfConnectDBFabric {
                public TaxProcessor createTaxProcessor() {
                        return new CanadaTaxProcessor();
                }
                public ShipFeeProcessor createShipFeeProcessor() {
                        return new CanadaShipFeeProcessor();
                }
}
 
class EuropeFinancialToolsFactory extends NewOfConnectDBFabric {
                public TaxProcessor createTaxProcessor() {
                        return new EuropeTaxProcessor();
                }
                public ShipFeeProcessor createShipFeeProcessor() {
                        return new EuropeShipFeeProcessor();
                }
}*/
 
        // Products

class FireBirdDBIninitialization extends InitializationDB{
	
}

class FireBirdDBConnect extends ConnectDB{
	
}

class FireBirdDBQuery extends QueryDB{
	
}

/*
class EuropeShipFeeProcessor extends ShipFeeProcessor {
                //public void calculateShipFee(Order order) 
        		{
                // insert here Europe specific ship fee calculation
                }
}       
 
class CanadaShipFeeProcessor extends ShipFeeProcessor {
                //public void calculateShipFee(Order order) 
        		{
                // insert here Canada specific ship fee calculation
                }
}
 
class EuropeTaxProcessor extends TaxProcessor {
                //public void calculateTaxes(Order order) 
        		{
                        // insert here Europe specific taxt calculation
                }
}
 
class CanadaTaxProcessor extends TaxProcessor {
                //public void calculateTaxes(Order order) 
        		{
                        // insert here Canada specific tax calculation
                }
}*/
 
        // Client
/*class OrderProcessor {
                private TaxProcessor taxProcessor;
                private ShipFeeProcessor shipFeeProcessor;
 
                public OrderProcessor(NewOfConnectDBFabric factory) {
                        taxProcessor = factory.createTaxProcessor();
                        shipFeeProcessor = factory.createShipFeeProcessor();    
                }
                public void processOrder (Order order)  {
                        // ....
                        taxProcessor.calculateTaxes(order);
                        shipFeeProcessor.calculateShipFee(order);
                        // ....
                }
}*/
 
        // Integration with the overall application
enum CountryCode {
                EU,
                CA
}
 
class Application {
                public static void main(final String... args) {
                        // .....
                        final CountryCode countryCode = CountryCode.EU;
 
                        final NewOfConnectDBFabric factory;
                        switch (countryCode) {
                                case EU:
                                        //factory = new EuropeFinancialToolsFactory();
                                        break;
                                case CA:
                                        //factory = new CanadaFinancialToolsFactory();
                                        break;
                                default:
                                        throw new IllegalStateException();
                        }
 
                        //final OrderProcessor orderProcessor = new OrderProcessor(factory);
                        //orderProcessor.processOrder(new Order());
                }
}